{extend name="base" /} {block name="body"}
<div class="layui-body">
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="">
				<a href="{:url('ad/index')}">首页图片</a>
			</li>
			<li class="layui-this">编辑图片</li>
		</ul>
		<div class="layui-tab-content">
			<div class="layui-tab-item layui-show">
				<form class="layui-form form-container" action="{:url('ad/update')}" method="post">
					<div class="layui-form-item">
						<label class="layui-form-label">标题</label>
						<div class="layui-input-block">
							<input type="text" name="title" value="{$article.title}" required lay-verify="required" placeholder="请输入标题" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">地址</label>
						<div class="layui-input-block">
							<input type="text" name="url" value="{$article.url}" placeholder="（选填）请输入地址" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">缩略图</label>
						<div class="layui-input-block">
							<img id="thumb_" class="img-see" src="{$article.thumb}" />
							<input type="text" name="thumb_img" readonly class="layui-input layui-input-inline">
							<input type="file" id="thumb_img" name="file" class="layui-upload-file">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">状态</label>
						<div class="layui-input-block">
							<input type="radio" name="status" value="1" title="已发布" {if condition="$article.status==1" } checked="checked" {/if}>
							<input type="radio" name="status" value="0" title="未发布" {if condition="$article.status==0" } checked="checked" {/if}>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-input-block">
							<input type="hidden" name="id" value="{$article.id}">
							<button class="layui-btn" lay-submit lay-filter="*">更新</button>
							<button type="reset" class="layui-btn layui-btn-primary">重置</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
{/block}